package com.vcredit.creditcat.service;

import com.vcredit.creditcat.framework.pagination.Criteria;
import com.vcredit.creditcat.framework.pagination.Page;
import com.vcredit.creditcat.model.AppVersion;
import com.vcredit.creditcat.persistence.base.AppVersionMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 
 **/
@Service
public class AppVersionService {
	@Autowired
	private AppVersionMapper mapper;

	public void insert(AppVersion obj) {
		mapper.insert(obj);
	}

	public void update(AppVersion obj) {
		mapper.update(obj);
	}

	public List<AppVersion> findAll() {
		return mapper.findAll();
	}

	public Page<AppVersion> findByPage(Criteria criteria){
		return new Page<AppVersion>(mapper.findByPageCount(criteria), mapper.findByPage(criteria));
	}

	public List<AppVersion> find(AppVersion obj) {
		return mapper.find(obj);
	}

	public List<AppVersion> findByAppDesc(String appDesc) {
		return mapper.findByAppDesc(appDesc);
	}
}